import request from '../utils/axios';
// 登录api
export function login(data) {
	return request({
		url: '/system/user/login',
		method: 'post',
		data
	});
}

// 表格数据
export function getQuestionList(data) {
	return request({
		url: '/website/question/getQuestionList',
		method: 'post',
		data
	});
}
// 查询用户列表
export function getuserList(data) {
	return request({
		url: '/system/user/getUserList',
		method: 'get',
		params: data
	});
}
//添加用户
export function addUser(data) {
	return request({
		url: '/system/user/addUser',
		method: 'post',
		data
	});
}
// 查询角色列表
export function getRoleList(data) {
	return request({
		url: '/system/role/getRoleList',
		method: 'get',
		params: data
	});
}
//添加角色信息
export function addRole(data) {
	return request({
		url: '/system/role/addRole',
		method: 'post',
		data
	});
}
//编辑角色信息
// export function updateRole(data) {
// 	return request({
// 		url: '/system/role/updateRole',
// 		method: 'put',
// 		data
// 	});
// }
//删除角色信息
// export function deleteRoleById(data) {
// 	return request({
// 		url: '/system/role/deleteRoleById',
// 		method: 'put',
// 		data
// 	});
// }
// 获取角色菜单配置
export function getSysRoleMenuSetting(data) {
	return request({
		url: '/system/roleMenuRel/getSysRoleMenuSetting',
		method: 'get',
		params: data
	});
}
// 获取水智控大屏数据
export function getScreenData(data) {
	return request({
		url: '/wsc/vrv/getScreenData',
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded'
		},
		method: 'get',
		params: data
	});
}

// 获取水智控水质分析数据
export function getVrvItemTrendByDeviceId(data) {
	return request({
		url: '/wsc/vrv/getVrvItemTrendByDeviceId',
		method: 'get',
		// headers: {
		// 	'Content-Type': 'application/x-www-form-urlencoded'
		// },
		params: data
	});
}

// 获取档案列表
export function getList(data) {
	return request({
		url: '/equipment/deviceFile/getList',
		method: 'get',
		params: data
	});
}

// 获取档案模型列表
export function modelList(data) {
	return request({
		url: '/equipment/deviceModel/getList',
		method: 'get',
		params: data
	});
}
// 获取设备模型列表
export function getDeviceModel(data) {
	return request({
		url: '/system/meterModel/getList',
		method: 'get',
		params: data
	});
}
// 添加设备信息
export function addMeter(data) {
	return request({
		url: '/system/energyMeter/addMeter',
		method: 'post',
		data
	});
}
// 获取设备列表
export function getMeter(data) {
	return request({
		url: '/system/energyMeter/getMeter',
		method: 'get',
		params: data
	});
}
// 添加档案
export function addItem(data) {
	return request({
		method: 'post',
		url: '/equipment/deviceFile/addItem',
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded'
		},
		data: data
	});
}
// 增加维度信息
export function addEnergyFiled(data) {
	return request({
		url: '/system/field/addEnergyFiled',
		method: 'post',
		data
	});
}
// 查询系统能源种类
export function getEnergyList(data) {
	return request({
		url: '/system/energyType/getList',
		method: 'get',
		params: data
	});
}
// 查询维度信息
export function getEnergyFiledList(data) {
	return request({
		url: '/system/field/getEnergyFiledList',
		method: 'get',
		params: data
	});
}
// 删除维度信息
export function deleteEnergyFiledById(data) {
	return request({
		url: '/system/field/deleteEnergyFiledById',
		method: 'delete',
		params: data
	});
}
// 查询维度属性信息
export function getFiledListData(data) {
	return request({
		url: '/system/fieldAttr/getEnergyFieldAttrList',
		method: 'get',
		params: data
	});
}
// 增加维度属性信息
export function addEnergyFieldAttr(data) {
	return request({
		url: '/system/fieldAttr/addEnergyFieldAttr',
		method: 'post',
		data
	});
}
// 修改维度属性信息
export function updateEnergyFieldAttr(data) {
	return request({
		url: '/system/field/updateEnergyFieldAttr',
		method: 'put',
		data
	});
}
// 删除维度属性信息
export function deleteEnergyFieldAttrById(data) {
	return request({
		url: '/system/fieldAttr/deleteEnergyFieldAttrById',
		method: 'delete',
		params: data
	});
}
// 查询维度属性绑定设备信息
export function getAttrBindMeterList(data) {
	return request({
		url: '/system/fieldDetail/getAttrBindMeterList',
		method: 'get',
		params: data
	});
}
// 查询维度属性可绑定设备信息
export function getBindAbleMeterList(data) {
	return request({
		url: '/system/fieldDetail/getBindAbleMeterList',
		method: 'get',
		params: data
	});
}
// 维度属性绑定设备信息
export function addFieldMeter(data) {
	return request({
		url: '/system/fieldDetail/addFieldMeter',
		method: 'post',
		data
	});
}
// 解除绑定维度属性设备信息
export function deleteFieldMeter(data) {
	return request({
		url: '/system/fieldDetail/deleteFieldMeter',
		method: 'delete',
		params: data
	});
}
// 成本日历
export function getCostCalendar(data) {
	return request({
		url: '/iems/cost/getCostCalendar',
		method: 'get',
		params: data
	});
}
// 成本趋势
export function getCostTrend(data) {
	return request({
		url: '/iems/cost/getCostTrend',
		method: 'get',
		params: data
	});
}
// 获取水智控水质报告
export function getVrvReport(data) {
	return request({
		url: '/wsc/vrv/getVrvReport',
		method: 'get',
		params: data
	});
}
// 获取告警记录列表
export function getAlarmList(data) {
	return request({
		url: '/system/warningRecord/getList',
		method: 'get',
		params: data
	});
}
// 档案绑定硬件设备
export function bindMachs(data) {
	return request({
		url: '/equipment/deviceMach/bindMachs',
		method: 'post',
		data
	});
}
// 获取水智控设备档案详情
export function getVrvDetail(data) {
	return request({
		url: '/wsc/vrv/getVrvDetail',
		method: 'get',
		params: data
	});
}
// 获取水智控设备数据趋势图
export function getVrvItemTrend(data) {
	return request({
		url: '/wsc/vrv/getVrvItemTrend',
		method: 'get',
		params: data
	});
}

// 查询系统能源种类
export function getEnergytypes(data) {
	return request({
		url: '/system/energyType/getList',
		method: 'get',
		params: data
	});
}
// 获取数据看板配置
export function getDataViewSetting(data) {
	return request({
		url: '/system/dataView/getDataViewSetting',
		method: 'get',
		params: data
	});
}
// 设置数据看板配置
export function setDataViewSetting(data) {
	return request({
		url: '/system/dataView/setDataViewSetting',
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded'
		},
		method: 'post',
		data
	});
}
// 获取告警分析页面数据
export function getWarningAnalyz(data) {
	return request({
		url: '/system/warningRecord/getWarningAnalyz',
		method: 'get',
		params: data
	});
}
// 获取告警记录历史跟进日志
export function getRecordLog(data) {
	return request({
		url: '/system/warningRecord/getRecordLog',
		method: 'get',
		params: data
	});
}
// 获取告警跟进动作类型
export function Followuptype(data) {
	return request({
		url: '/system/warningRecordActionType/getList',
		method: 'get',
		params: data
	});
}
// 获取告警规则列表
export function attrWarningRule(data) {
	return request({
		url: '/system/attrWarningRule/getList',
		method: 'get',
		params: data
	});
}
// 获取告警规则类型
export function AlarmRules(data) {
	return request({
		url: '/system/attrWarningType/getList',
		method: 'get',
		params: data
	});
}
// 添加告警规则

export function Addalarmrules(data) {
	return request({
		url: '/system/attrWarningRule/addItem',
		method: 'post',
		data
	});
}
// 跟进告警事件
export function operWarning(data) {
	return request({
		url: '/system/warningRecord/operWarning',
		method: 'post',
		data
	});
}
// 数据看板-获取能源数据
export function getEnergyUsedInfo(data) {
	return request({
		url: '/iems/cost/getEnergyUsedInfo',
		method: 'get',
		params: data
	});
}
// 获取COP基准时间配置
export function getCtrlTime(data) {
	return request({
		url: '/wsc/cop/getCtrlTime',
		method: 'get',
		params: data
	});
}
// 配置COP基准时间
export function setCtrlTime(data) {
	return request({
		url: '/wsc/cop/setCtrlTime',
		method: 'post',
		data
	});
}
// 获取COP趋势
export function getCOPTrend(data) {
	return request({
		url: '/wsc/cop/getCOPTrend',
		method: 'get',
		params: data
	});
}
